/* 
 * File:   primitives.h
 * Author: gustavo
 *
 * Created on February 3, 2012, 6:02 AM
 */

#ifndef PRIMITIVES_H
#define	PRIMITIVES_H

#ifdef	__cplusplus
extern "C" {
#endif

#include <util/types.h>
	
	void convolve2D_avoid_border(real * M, int rows, int columns, real * W, int wrows, int wcolumns, real * Out);
	void convolve2D_avoid_border_with_mask(real * M, int rows, int columns, real * W, int wrows, int wcolumns, real * Mask, real * Out);
	void convolve2D_zero_padding(real * M, int rows, int columns, real * W, int wrows, int wcolumns, real * Out);
	void convolve2D_zero_padding_with_mask(real * M, int rows, int columns, real * W, int wrows, int wcolumns, real * Mask, real * Out);
	void convolve2D_border_reflect(real * M, int rows, int columns, real * W, int wrows, int wcolumns, real * Out);
	void convolve2D_border_reflect_with_mask(real * M, int rows, int columns, real * W, int wrows, int wcolumns, real * Mask, real * Out);
	void convolve2D_rectangle_region(real * M, int rows, int columns, real * W, int wrows, int wcolumns, real * Out, int r0, int c0, int r1, int c1);
	void convolve2D_rectangle_region_with_mask(real * M, int rows, int columns, real * W, int wrows, int wcolumns, real * Mask, real * Out, int r0, int c0, int r1, int c1);
	void convolve2D_border_reflect_fast(real * M, int rows, int columns, real * W, int wrows, int wcolumns, real * Out);
	void convolve2D_border_reflect_fast_with_mask(real * M, int rows, int columns, real * W, int wrows, int wcolumns, real * Mask, real * Out);

#ifdef	__cplusplus
}
#endif

#endif	/* PRIMITIVES_H */

